﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MyMainSite.Models.BaseModel>" %>

<a class="menuItemThis" href="/">this</a>&nbsp;->&nbsp;<a class="menuItem" href="/<%: Model.CurrentController %>/"><%: Model.CurrentController %></a>
<%
    string url = String.Format("/{0}/index/", Model.CurrentController);

    int i = 0;
    foreach(var b in Model.BreadCrumb)
    {
        url = String.Format("{0}{1}/", url, b.Value);

        if(i++ == Model.BreadCrumb.Count() - 1)
        {
            %>&nbsp;->&nbsp;<span class="menuItemSelected"><%: b.Key %></span><%
        }
        else
        {
            %>&nbsp;->&nbsp;<a class="menuItem" href="<%: url %>"><%: b.Key %></a><%
        }
    }
%>